package com.ocm.pay.service;

import org.springframework.transaction.annotation.Transactional;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 *  服务类
 *
 * @author HQY
 * @since 2022-01-11
 */
public interface IPayService {

	@Transactional
	boolean deal(@NotNull Long payerId,@NotNull String payerName,@NotNull int payerType,
				 @NotNull Long payeeId,@NotNull String payeeName,@NotNull int payeeType,
				 @NotNull BigDecimal amount,
				 Long orderId,String orderDescribe,
				 Long cardId,@NotNull String bankType,Long bankCard,String cardType,
				 String payPassword, String remark);

	@Transactional
	boolean recharge(@NotNull Long payeeId,@NotNull String payeeName,@NotNull int payeeType,
					 @NotNull BigDecimal amount,
					 Long orderId,String orderDescribe,String payPassword,
					 Long cardId,@NotNull String bankType,Long bankCard,String cardType,
					 String remark);

	@Transactional
	boolean withdraw(@NotNull Long payerId,@NotNull String payerName,int payerType,
					 @NotNull BigDecimal amount,
					 @NotNull Long cardId,@NotNull String bankType,@NotNull Long bankCard,@NotNull String cardType,
					 String payPassword, String remark);

	@Transactional
	void refund(BigDecimal amount,
		   @NotNull Long orderId,
		   String remark);

	@Transactional
	void receiving(Long orderId);

}
